<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAdminTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('username',40)->unique()->comment('账号');
            $table->string('password')->comment('密码');
            $table->integer('admin_role_id')->default(0)->comment('角色id');
            $table->integer('project_id')->default(0)->comment('当前选择项目id');
            $table->string('project_ids')->default(0)->comment('可选项目id');
            $table->tinyInteger('status')->default(0)->comment('状态：0-禁用；1-启用；');
            $table->timestamps();
            $table->softDeletes();
        });
        \Illuminate\Support\Facades\DB::statement("ALTER TABLE `admin` comment '管理员表'");
    
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin');
    }
}
